/**
 * 账单接口
 */
import {
  HTTP
} from '../utils/http.js';
import utils from '../utils/util';

class billModel extends HTTP {
  
  // 查询供应商账单列表
  billListPage(data, sCallback, showLoading) {
    this.request({
      url: 'supplier/app/order/bill/listPage/supplier',
      method: 'get',
      data: data,
      success: (res) => {
        if(res.code == 200){
          sCallback(res)
        }else{
          utils.msg(res.msg)
        }
      }
    },showLoading)
  }
  
  // 查询供应商账单详情
  billFindById(data, sCallback) {
    this.request({
      url: 'supplier/app/order/bill/findById/supplier',
      method: 'get',
      data: data,
      success: (res) => {
        if(res.code == 200){
          sCallback(res)
        }else{
          utils.msg(res.msg)
        }
      }
    })
  }

  // 确认账单
  billConfirm(data, sCallback) {
    this.request({
      url: 'supplier/app/order/bill/confirm',
      method: 'post',
      data: data,
      success: (res) => {
        if(res.code == 200){
          sCallback(res)
        }else{
          utils.msg(res.msg)
        }
      }
    })
  }

}
export {
  billModel
}